package com.itany.corejava.day04;

import java.util.Scanner;

public class Test1 {


    public static void main(String[] args) {

        Scanner sc=new Scanner(System.in);
        System.out.println("x=");
        int x=sc.nextInt();

        int y=0;

        if(x<-1){
            y=x*x-1;
        }
        if(-1<=x&&x<=1){
            y=Math.abs(x)+1;
        }
        if(x>1){
            y=3*x+3;
        }

        System.out.println("y = " + y);

    }


}
